.class public Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;
.super Lcom/glympse/android/glympseservice/NotificationList$NotificationBase;
.source "NotificationList.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympseservice/NotificationList;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "NotificationGlobal"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympseservice/NotificationList;


# direct methods
.method private constructor <init>(Lcom/glympse/android/glympseservice/NotificationList;)V
    .locals 6
    .parameter

    .prologue
    const-wide/16 v2, 0x0

    const/4 v1, 0x0

    .line 584
    iput-object p1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->this$0:Lcom/glympse/android/glympseservice/NotificationList;

    .line 551
    invoke-direct {p0, p1, v2, v3, v1}, Lcom/glympse/android/glympseservice/NotificationList$NotificationBase;-><init>(Lcom/glympse/android/glympseservice/NotificationList;JLcom/glympse/android/glympseservice/NotificationList$NotificationBase;)V

    .line 556
    const/4 v1, 0x0

    :try_start_0
    iput-object v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->tickerText:Ljava/lang/CharSequence;

    .line 559
    const v1, 0x7f02007e

    iput v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->icon:I

    .line 567
    const-wide/16 v1, 0x0

    iput-wide v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->when:J

    .line 572
    iget v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->flags:I

    or-int/lit8 v1, v1, 0xa

    iput v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->flags:I

    .line 575
    sget-object v1, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    const/4 v2, 0x0

    new-instance v3, Landroid/content/Intent;

    sget-object v4, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    const-class v5, Lcom/glympse/android/glympse/Glympse;

    invoke-direct {v3, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/4 v4, 0x0

    invoke-static {v1, v2, v3, v4}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v1

    iput-object v1, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->contentIntent:Landroid/app/PendingIntent;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 582
    :goto_0
    return-void

    .line 580
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 582
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method synthetic constructor <init>(Lcom/glympse/android/glympseservice/NotificationList;Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 549
    invoke-direct {p0, p1}, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;-><init>(Lcom/glympse/android/glympseservice/NotificationList;)V

    return-void
.end method


# virtual methods
.method protected IsOngoing()Z
    .locals 1

    .prologue
    .line 589
    const/4 v0, 0x1

    return v0
.end method

.method protected Update(Lcom/glympse/platform/common/Ticket;IIIIJJ)V
    .locals 7
    .parameter "oTicket"
    .parameter "nActive"
    .parameter "nWatching"
    .parameter "nHaveWatched"
    .parameter "nRecipients"
    .parameter "lRemaining"
    .parameter "lSystemTime"

    .prologue
    .line 595
    sget-object v5, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    invoke-virtual {v5}, Lcom/glympse/android/glympseservice/GlympseService;->IsNetworkError()Z

    move-result v1

    .line 596
    .local v1, fError:Z
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-boolean v5, v5, Lcom/glympse/platform/Platform;->m_fBatteryGood:Z

    if-nez v5, :cond_3

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-boolean v5, v5, Lcom/glympse/platform/Platform;->m_fBatteryForce:Z

    if-nez v5, :cond_3

    const/4 v5, 0x1

    move v2, v5

    .line 599
    .local v2, fPaused:Z
    :goto_0
    if-nez v1, :cond_0

    if-eqz v2, :cond_4

    :cond_0
    const v5, 0x7f02008b

    :goto_1
    iput v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->icon:I

    .line 603
    const-wide/16 v5, 0x0

    iput-wide v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->when:J

    .line 605
    const-wide/16 v5, 0x0

    cmp-long v5, p6, v5

    if-lez v5, :cond_5

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Glympse: "

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {p6, p7}, Lcom/glympse/platform/common/Helpers;->DurationToStr(J)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " remaining"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    move-object v3, v5

    .line 606
    .local v3, strTitle:Ljava/lang/String;
    :goto_2
    if-eqz v1, :cond_6

    const-string v5, "No network connection."

    move-object v4, v5

    .line 611
    .local v4, strViewers:Ljava/lang/String;
    :goto_3
    iget-object v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->tickerText:Ljava/lang/CharSequence;

    if-nez v5, :cond_1

    .line 613
    iput-object v3, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->tickerText:Ljava/lang/CharSequence;

    .line 621
    :cond_1
    sget-object v5, Lcom/glympse/android/glympseservice/GlympseService;->ms_oThis:Lcom/glympse/android/glympseservice/GlympseService;

    iget-object v6, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->contentIntent:Landroid/app/PendingIntent;

    invoke-virtual {p0, v5, v3, v4, v6}, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V

    .line 624
    iget-object v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->tickerText:Ljava/lang/CharSequence;

    if-nez v5, :cond_2

    .line 626
    iput-object v3, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->tickerText:Ljava/lang/CharSequence;

    .line 630
    :cond_2
    iget v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->flags:I

    or-int/lit8 v5, v5, 0xa

    iput v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->flags:I

    .line 633
    const-wide/16 v5, 0x0

    iput-wide v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->when:J

    .line 638
    :try_start_0
    iget-object v5, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->this$0:Lcom/glympse/android/glympseservice/NotificationList;

    invoke-virtual {v5}, Lcom/glympse/android/glympseservice/NotificationList;->GetNotificationManager()Landroid/app/NotificationManager;

    move-result-object v5

    iget v6, p0, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->m_nId:I

    invoke-virtual {v5, v6, p0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 644
    :goto_4
    return-void

    .line 596
    .end local v2           #fPaused:Z
    .end local v3           #strTitle:Ljava/lang/String;
    .end local v4           #strViewers:Ljava/lang/String;
    :cond_3
    const/4 v5, 0x0

    move v2, v5

    goto :goto_0

    .line 599
    .restart local v2       #fPaused:Z
    :cond_4
    invoke-virtual {p0, p3}, Lcom/glympse/android/glympseservice/NotificationList$NotificationGlobal;->GetWatchingIcon(I)I

    move-result v5

    goto :goto_1

    .line 605
    :cond_5
    const-string v5, "Glympse"

    move-object v3, v5

    goto :goto_2

    .line 607
    .restart local v3       #strTitle:Ljava/lang/String;
    :cond_6
    if-eqz v2, :cond_7

    const-string v5, "Paused due to low battery, click to resume."

    move-object v4, v5

    goto :goto_3

    .line 608
    :cond_7
    if-lez p2, :cond_8

    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "Viewers: "

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " recent, "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " total"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    move-object v4, v5

    goto :goto_3

    :cond_8
    const-string v5, "No active Glympses"

    move-object v4, v5

    goto :goto_3

    .line 640
    .restart local v4       #strViewers:Ljava/lang/String;
    :catch_0
    move-exception v5

    move-object v0, v5

    .line 642
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_4
.end method
